Class: GOBL::Bill::Order
- Defined in:
- lib/generated/gobl/bill/order.rb
Overview
Order documents are used for the initial part of a order-to-invoice process where the buyer requests goods or services from the seller.
Constant Summary collapse
- SCHEMA_ID =
The Schema ID of the GOBL Order structure
'https://gobl.org/draft-0/bill/order'
- TYPE_ENUM =
Enumeration of possible values for #type with their corresponding descriptions
{ 'purchase' => 'A purchase order is a document that a buyer sends to a seller to request goods or services.', 'sale' => 'A sales order is a document that a seller sends to a buyer to confirm the sale of goods or services.', 'quote' => 'A quote is a document that a seller sends to a buyer to provide a price for goods or services.' }.freeze
Instance Attribute Summary collapse
-
#$addons($addons) ⇒ Array<GOBL::CBC::Key>
readonly
Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.
- #$regime($regime) ⇒ GOBL::L10n::TaxCountryCode readonly
-
#$tags($tags) ⇒ Array<GOBL::CBC::Key>
readonly
Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice.
-
#attachments ⇒ Array<GOBL::Org::Attachment>
readonly
Attachments provide additional information or supporting documents that are not included in the main document.
-
#buyer ⇒ GOBL::Org::Party
readonly
Party who is responsible for issuing payment, if not the same as the customer.
-
#charges ⇒ Array<GOBL::Bill::Charge>
readonly
Charges or surcharges applied to order totals.
-
#code ⇒ GOBL::CBC::Code
readonly
Code is a sequential identifier that uniquely identifies the order.
-
#complements ⇒ Array<GOBL::Schema::Object>
readonly
Additional complementary objects that add relevant information to the order.
-
#contracts ⇒ Array<GOBL::Org::DocumentRef>
readonly
The identification of contracts.
-
#currency ⇒ GOBL::Currency::Code
readonly
Currency for all invoice totals.
-
#customer ⇒ GOBL::Org::Party
readonly
Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices.
-
#delivery ⇒ GOBL::Bill::DeliveryDetails
readonly
Specific details on delivery of the goods to copy to the final invoice.
-
#discounts ⇒ Array<GOBL::Bill::Discount>
readonly
Discounts or allowances applied to order totals.
-
#exchange_rates ⇒ Array<GOBL::Currency::ExchangeRate>
readonly
Exchange rates to be used when converting the invoices monetary values into other currencies.
-
#identities ⇒ Array<GOBL::Org::Identity>
readonly
Additional codes, IDs, SKUs, or other regional or custom identifiers that may be used to identify the order.
-
#issue_date ⇒ GOBL::Cal::Date
readonly
When the invoice was created.
-
#issue_time ⇒ GOBL::Cal::Time
readonly
IssueTime is an optional field that may be useful to indicate the time of day when the order was issued.
-
#lines ⇒ Array<GOBL::Bill::Line>
readonly
List of lines representing each of the items to be ordered.
-
#meta ⇒ GOBL::CBC::Meta
readonly
Additional semi-structured data that doesn’t fit into the body of the order.
-
#notes ⇒ Array<GOBL::Org::Note>
readonly
Unstructured information that is relevant to the order, such as correction or additional legal details.
-
#op_date ⇒ GOBL::Cal::Date
readonly
Date when the operation defined by the invoice became effective.
-
#payment ⇒ GOBL::Bill::PaymentDetails
readonly
Information on when, how, and to whom a final invoice would be paid.
-
#period ⇒ GOBL::Cal::Period
readonly
Period of time in which the order is valid.
-
#preceding ⇒ Array<GOBL::Org::DocumentRef>
readonly
Key information regarding previous order documents.
-
#seller ⇒ GOBL::Org::Party
readonly
Seller is the party liable to pay taxes on the transaction if not the same as the supplier.
-
#series ⇒ GOBL::CBC::Code
readonly
Series is used to identify groups of orders by date, business area, project, type, customer, a combination of any, or other company specific data.
-
#supplier ⇒ GOBL::Org::Party
readonly
The entity supplying the goods or services and usually responsible for paying taxes.
-
#tax ⇒ GOBL::Bill::Tax
readonly
Special tax configuration for billing.
-
#totals ⇒ GOBL::Bill::Totals
readonly
Summary of all the order totals, including taxes (calculated).
-
#type ⇒ GOBL::CBC::Key
readonly
Type of the order.
-
#uuid ⇒ String
readonly
Universally Unique Identifier.
-
#value_date ⇒ GOBL::Cal::Date
readonly
When the taxes of this invoice become accountable, if none set, the issue date is used.
Method Summary
Methods inherited from Object
Methods inherited from Struct
#as_json, from_data, from_json!, #to_json
Instance Attribute Details
#$addons($addons) ⇒ Array<GOBL::CBC::Key> (readonly)
Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.
46 |
# File 'lib/generated/gobl/bill/order.rb', line 46 property :$addons, [GOBL::CBC::Key] |
#$regime($regime) ⇒ GOBL::L10n::TaxCountryCode (readonly)
40 |
# File 'lib/generated/gobl/bill/order.rb', line 40 property :$regime, GOBL::L10n::TaxCountryCode |
#$tags($tags) ⇒ Array<GOBL::CBC::Key> (readonly)
Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags.
51 |
# File 'lib/generated/gobl/bill/order.rb', line 51 property :$tags, [GOBL::CBC::Key] |
#attachments ⇒ Array<GOBL::Org::Attachment> (readonly)
Attachments provide additional information or supporting documents that are not included in the main document. It is important that attachments are not used for alternative versions of the PDF, for that, see “links” inside the envelope headers.
205 |
# File 'lib/generated/gobl/bill/order.rb', line 205 property :attachments, [GOBL::Org::Attachment] |
#buyer ⇒ GOBL::Org::Party (readonly)
Party who is responsible for issuing payment, if not the same as the customer.
150 |
# File 'lib/generated/gobl/bill/order.rb', line 150 property :buyer, GOBL::Org::Party |
#charges ⇒ Array<GOBL::Bill::Charge> (readonly)
Charges or surcharges applied to order totals
170 |
# File 'lib/generated/gobl/bill/order.rb', line 170 property :charges, [GOBL::Bill::Charge] |
#code ⇒ GOBL::CBC::Code (readonly)
Code is a sequential identifier that uniquely identifies the order. The code can be left empty initially, but is required to sign the document.
79 |
# File 'lib/generated/gobl/bill/order.rb', line 79 property :code, GOBL::CBC::Code |
#complements ⇒ Array<GOBL::Schema::Object> (readonly)
Additional complementary objects that add relevant information to the order.
195 |
# File 'lib/generated/gobl/bill/order.rb', line 195 property :complements, [GOBL::Schema::Object] |
#contracts ⇒ Array<GOBL::Org::DocumentRef> (readonly)
The identification of contracts.
114 |
# File 'lib/generated/gobl/bill/order.rb', line 114 property :contracts, [GOBL::Org::DocumentRef] |
#currency ⇒ GOBL::Currency::Code (readonly)
Currency for all invoice totals.
104 |
# File 'lib/generated/gobl/bill/order.rb', line 104 property :currency, GOBL::Currency::Code |
#customer ⇒ GOBL::Org::Party (readonly)
Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices.
145 |
# File 'lib/generated/gobl/bill/order.rb', line 145 property :customer, GOBL::Org::Party |
#delivery ⇒ GOBL::Bill::DeliveryDetails (readonly)
Specific details on delivery of the goods to copy to the final invoice.
180 |
# File 'lib/generated/gobl/bill/order.rb', line 180 property :delivery, GOBL::Bill::DeliveryDetails |
#discounts ⇒ Array<GOBL::Bill::Discount> (readonly)
Discounts or allowances applied to order totals
165 |
# File 'lib/generated/gobl/bill/order.rb', line 165 property :discounts, [GOBL::Bill::Discount] |
#exchange_rates ⇒ Array<GOBL::Currency::ExchangeRate> (readonly)
Exchange rates to be used when converting the invoices monetary values into other currencies.
109 |
# File 'lib/generated/gobl/bill/order.rb', line 109 property :exchange_rates, [GOBL::Currency::ExchangeRate] |
#identities ⇒ Array<GOBL::Org::Identity> (readonly)
Additional codes, IDs, SKUs, or other regional or custom identifiers that may be used to identify the order.
124 |
# File 'lib/generated/gobl/bill/order.rb', line 124 property :identities, [GOBL::Org::Identity] |
#issue_date ⇒ GOBL::Cal::Date (readonly)
When the invoice was created.
84 |
# File 'lib/generated/gobl/bill/order.rb', line 84 property :issue_date, GOBL::Cal::Date |
#issue_time ⇒ GOBL::Cal::Time (readonly)
IssueTime is an optional field that may be useful to indicate the time of day when the order was issued. Some regions and formats may require this field to be set. An empty string will be automatically updated to reflect the current time, otherwise the field can be left with a nil value.
89 |
# File 'lib/generated/gobl/bill/order.rb', line 89 property :issue_time, GOBL::Cal::Time |
#lines ⇒ Array<GOBL::Bill::Line> (readonly)
List of lines representing each of the items to be ordered.
160 |
# File 'lib/generated/gobl/bill/order.rb', line 160 property :lines, [GOBL::Bill::Line] |
#meta ⇒ GOBL::CBC::Meta (readonly)
Additional semi-structured data that doesn’t fit into the body of the order.
200 |
# File 'lib/generated/gobl/bill/order.rb', line 200 property :meta, GOBL::CBC::Meta |
#notes ⇒ Array<GOBL::Org::Note> (readonly)
Unstructured information that is relevant to the order, such as correction or additional legal details.
190 |
# File 'lib/generated/gobl/bill/order.rb', line 190 property :notes, [GOBL::Org::Note] |
#op_date ⇒ GOBL::Cal::Date (readonly)
Date when the operation defined by the invoice became effective.
94 |
# File 'lib/generated/gobl/bill/order.rb', line 94 property :op_date, GOBL::Cal::Date |
#payment ⇒ GOBL::Bill::PaymentDetails (readonly)
Information on when, how, and to whom a final invoice would be paid.
175 |
# File 'lib/generated/gobl/bill/order.rb', line 175 property :payment, GOBL::Bill::PaymentDetails |
#period ⇒ GOBL::Cal::Period (readonly)
Period of time in which the order is valid.
129 |
# File 'lib/generated/gobl/bill/order.rb', line 129 property :period, GOBL::Cal::Period |
#preceding ⇒ Array<GOBL::Org::DocumentRef> (readonly)
Key information regarding previous order documents.
119 |
# File 'lib/generated/gobl/bill/order.rb', line 119 property :preceding, [GOBL::Org::DocumentRef] |
#seller ⇒ GOBL::Org::Party (readonly)
Seller is the party liable to pay taxes on the transaction if not the same as the supplier.
155 |
# File 'lib/generated/gobl/bill/order.rb', line 155 property :seller, GOBL::Org::Party |
#series ⇒ GOBL::CBC::Code (readonly)
Series is used to identify groups of orders by date, business area, project, type, customer, a combination of any, or other company specific data. If the output format does not support the series as a separate field, it will be prepended to the code for presentation with a dash (‘-`) for separation.
74 |
# File 'lib/generated/gobl/bill/order.rb', line 74 property :series, GOBL::CBC::Code |
#supplier ⇒ GOBL::Org::Party (readonly)
The entity supplying the goods or services and usually responsible for paying taxes.
139 |
# File 'lib/generated/gobl/bill/order.rb', line 139 property :supplier, GOBL::Org::Party |
#tax ⇒ GOBL::Bill::Tax (readonly)
Special tax configuration for billing.
134 |
# File 'lib/generated/gobl/bill/order.rb', line 134 property :tax, GOBL::Bill::Tax |
#totals ⇒ GOBL::Bill::Totals (readonly)
Summary of all the order totals, including taxes (calculated).
185 |
# File 'lib/generated/gobl/bill/order.rb', line 185 property :totals, GOBL::Bill::Totals |
#type ⇒ GOBL::CBC::Key (readonly)
Type of the order.
68 |
# File 'lib/generated/gobl/bill/order.rb', line 68 property :type, GOBL::CBC::Key |
#uuid ⇒ String (readonly)
Universally Unique Identifier.
56 |
# File 'lib/generated/gobl/bill/order.rb', line 56 property :uuid, String |
#value_date ⇒ GOBL::Cal::Date (readonly)
When the taxes of this invoice become accountable, if none set, the issue date is used.
99 |
# File 'lib/generated/gobl/bill/order.rb', line 99 property :value_date, GOBL::Cal::Date |